<?php
/**
 * User: @lixu
 * Date: 2019-05-14
 * Time: 16:57
 */

ini_set('display_errors', 1);
error_reporting(-1);
require_once '/data/wwwroot/g_vendor/autoload.php';

use Biz\model\ShopFavorite as mShopFavorite;
use Biz\service\esSearch\ShopFavorite;

// 同步ShopFavorite的数据至es

$list = mShopFavorite::select('*');

foreach ($list as $value) {
    $result = ShopFavorite::saveByWikiId($value);
    var_dump($result);
}